package com.hdu.other.topsort;


import java.io.*;
import java.util.Arrays;

public class Template {
    private static final int MAX_N = 200000;

    private static int N;

    /**
     * 链式前向星相关
     */
    private static final int[] HEAD = new int[MAX_N];
    private static final int[] TO = new int[MAX_N];
    private static final int[] NEXT = new int[MAX_N];
    private static int CNT;


    /**
     * 拓扑排序相关
     */
    private static final int[] ID_DEGREE = new int[MAX_N];
    private static final int[] Q = new int[MAX_N];

    /**
     * 拓扑排序结果
     */
    private static final int[] ANS = new int[MAX_N];


    public static void main(String[] args) throws IOException {

        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter writer = new PrintWriter(new OutputStreamWriter(System.out));
        StreamTokenizer tokenizer = new StreamTokenizer(reader);

        while (tokenizer.nextToken() != StreamTokenizer.TT_EOF) {
            N = (int) tokenizer.nval;
            refresh();
            tokenizer.nextToken();
            int edgeCount = (int) tokenizer.nval;
            for (int i = 0; i < edgeCount; i++) {
                tokenizer.nextToken();
                int from = (int) tokenizer.nval;
                tokenizer.nextToken();
                int to = (int) tokenizer.nval;
                addEdge(from, to);
                ID_DEGREE[to]++;
            }
            if (topSort()) {
                for (int i = 0; i < N - 1; i++) {
                    writer.print(ANS[i] + " ");
                }
                writer.println(ANS[N - 1]);
            } else {
                writer.println("-1");
            }
        }

        writer.flush();
        writer.close();
        reader.close();
    }


    static boolean topSort() {
        int h = 0, t = 0;
        for (int i = 1; i <= N; i++) {
            if (ID_DEGREE[i] == 0) {
                Q[t++] = i;
            }
        }
        int fillCount = 0;
        while (h < t) {
            int cur = Q[h++];
            ANS[fillCount++] = cur;
            for (int curE = HEAD[cur]; curE > 0; curE = NEXT[curE]) {
                if (--ID_DEGREE[TO[curE]] == 0) {
                    Q[t++] = TO[curE];
                }
            }
        }
        return fillCount == N;
    }


    static void refresh() {
        CNT = 1;
        Arrays.fill(HEAD, 0);
        Arrays.fill(ID_DEGREE, 0);
    }

    static void addEdge(int from, int to) {
        NEXT[CNT] = HEAD[from];
        TO[CNT] = to;
        HEAD[from] = CNT++;
    }
}
